function Vue(options) {
  this.$data = this._data = options.data
  observe(this.$data)

}


function observe(obj) {
  if (!obj || typeof obj !== 'object') return
  Object.keys(obj).forEach((key) => {
    let originValue = obj[key]
    observe(originValue)
    Object.defineProperty(obj, key, {
      get() {
        return originValue
      },
      set(val) {
        originValue = val
      },
    })
  })
}
